package com.sh.cloudrender.application.dto.engine;

import java.util.Date;

/**
 * 引擎传输对象
 */
public class EngineDTO {
    //引擎id
    private String engineId;

    private String name;

    private Date createTime;

    private Date updateTime;

    private Date startTime;

    private Integer state;
    //引擎连接信息
    private String endpoint;
    private EngineSpec spec;
    private String image;

    public String getEngineId() {
        return engineId;
    }

    public void setEngineId(String engineId) {
        this.engineId = engineId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getEndpoint() {
        return endpoint;
    }

    public void setEndpoint(String endpoint) {
        this.endpoint = endpoint;
    }

    public void setEndpoint(String clusterExternalHost, long engineId,String port) {
        this.endpoint = clusterExternalHost + "/sh/engine/" + engineId + "/" + port;
    }

    public EngineSpec getSpec() {
        return spec;
    }

    public void setSpec(EngineSpec spec) {
        this.spec = spec;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }
}
